import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
  },
  {
    path: '/popular-area',
    name: 'popular-area',
    component: () => import('@/views/PopularArea.vue'),
  },
  {
    path: '/popular-food',
    name: 'popular-food',
    component: () => import('@/views/PopularFood.vue'),
  },
  {
    path: '/food-detail',
    name: 'food-detail',
    component: () => import('@/views/FoodDetail.vue'),
  },
  {
    path: '/popular-hotel',
    name: 'popular-hotel',
    component: () => import('@/views/PopularHotel.vue'),
  },
  {
    path: '/hotel-detail',
    name: 'hotel-detail',
    component: () => import('@/views/HotelDetail.vue'),
  },
  {
    path: '/local-features',
    name: 'local-features',
    component: () => import('@/views/LocalFeatures.vue'),
  },
  {
    path: '/feature-detail',
    name: 'feature-detail',
    component: () => import('@/views/FeatureDetail.vue'),
  },
  {
    path: '/travel-news',
    name: 'travel-news',
    component: () => import('@/views/TravelNews.vue'),
  },
  {
    path: '/travel-newsdetail',
    name: 'travel-newsdetail',
    component: () => import('@/views/TravelNewsdetail.vue'),
  },
  {
    path: '/scenic-list',
    name: 'scenic-list',
    component: () => import('@/views/ScenicList.vue'),
  },
  {
    path: '/scenic-detail',
    name: 'scenic-detail',
    component: () => import('@/views/ScenicDetail.vue'),
  },
  {
    path: '/area-homepage',
    name: 'area-homepage',
    component: () => import('@/views/AreaHomepage.vue'),
  },
  {
    path: '/area-list',
    name: 'area-list',
    component: () => import('@/views/AreaList.vue'),
  },
  {
    path: '/shop',
    name: 'shop',
    component: () => import('@/views/ShopView.vue'), // @ 永远指向src目录
  },
];

const router = new VueRouter({
  routes,
});

export default router;
